
package com.zsrt.jmj.teacher.dao;

import java.sql.SQLException;
import java.util.List;

import com.zsrt.jmj.teacher.entity.TeacherEntity;

public interface TeacherDao {

	/**
	 * 增加一个老师
	 * @return
	 * @throws Exception
	 */
	int add(TeacherEntity entity)throws Exception;

	/**
	 * 查询记录
	 * @return
	 */
	List<TeacherEntity> findAllTeachers()throws Exception;

	/**
	 * 更改教师
	 * @param entity
	 * @return
	 */
	int updateById(TeacherEntity entity) throws SQLException ;

	/**
	 * 根据ID查找记录
	 * @param tId
	 * @return
	 */
	TeacherEntity findTeacherById(int tId)throws SQLException;

	/**
	 * 根据ID删除
	 * @param cId
	 * @return
	 */
	int deleteById(int cId)throws SQLException;
}
